<<<<<<< HEAD
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QPainter>
#include <QPixmap>
#include <QPaintEvent>
#include <QPushButton>
#include "mybutton.h"
#include "mywindow.h"
#include<QTimer>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{   this->setFixedSize(1080,900);
    ui->setupUi(this);
    MyButton*bin=new MyButton(":/new/prefix1/button2.png");
    MyButton*quit=new MyButton(":/tc.png");
    bin->setParent(this);
    bin->move(475,700);
    quit->setParent(this);
    quit->move(500,800);
    Mywindow*scene=new Mywindow;

    connect(bin,&QPushButton::clicked,this,[=](){
        bin->zoomdown();
        bin->zoomup();
        QTimer::singleShot(500,this,[=](){
            this->hide();
            scene->show();
        });


    });
    connect(quit,&MyButton::clicked,this,&QMainWindow::close);

    //QPushButton*bin=new QPushButton(this);
    //bin->setFixedSize(100,50);
    //bin->move(40,40);
    //connect(bin,&QPushButton::clicked,this,&QMainWindow::close);
    connect(scene,&Mywindow::chooseBack,this,[=](){

            scene->hide();
            this->show();

    });
}



MainWindow::~MainWindow()
{
    delete ui;
}
void MainWindow::paintEvent(QPaintEvent*){
    QPainter painter(this);
    QPixmap pixmap(":/bkgd.jpg");
    painter.drawPixmap(0,0,this->width(),this->height(),pixmap);
}
=======
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QPainter>
#include <QPixmap>
#include <QPaintEvent>
#include <QPushButton>
#include "mybutton.h"
#include "mywindow.h"
#include<QTimer>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{   this->setFixedSize(1080,900);
    ui->setupUi(this);
    MyButton*bin=new MyButton(":/new/prefix1/button2.png");
    MyButton*quit=new MyButton(":/tc.png");
    bin->setParent(this);
    bin->move(475,700);
    quit->setParent(this);
    quit->move(500,800);
    Mywindow*scene=new Mywindow;

    connect(bin,&QPushButton::clicked,this,[=](){
        bin->zoomdown();
        bin->zoomup();
        QTimer::singleShot(500,this,[=](){
            this->hide();
            scene->show();
        });


    });
    connect(quit,&MyButton::clicked,this,&QMainWindow::close);

    //QPushButton*bin=new QPushButton(this);
    //bin->setFixedSize(100,50);
    //bin->move(40,40);
    //connect(bin,&QPushButton::clicked,this,&QMainWindow::close);
    connect(scene,&Mywindow::chooseBack,this,[=](){

            scene->hide();
            this->show();

    });
}



MainWindow::~MainWindow()
{
    delete ui;
}
void MainWindow::paintEvent(QPaintEvent*){
    QPainter painter(this);
    QPixmap pixmap(":/bkgd.jpg");
    painter.drawPixmap(0,0,this->width(),this->height(),pixmap);
}
>>>>>>> 199f3fb0e9bc83f97607ce663cfb658435caaa4f
